package com.bdqn;

import com.bdqn.entity.Pet;
import com.bdqn.factory.PetDaoFactory;
import com.bdqn.service.PetService;
import com.bdqn.service.impl.PetServiceImpl;

/**
 * Hello world!
 */
public class App {

    public static void main(String[] args) {
        Pet pet = new Pet("金丝熊");

        // 将控制权掌控在终端（将命运牢牢掌握在自己手上）
        PetDaoFactory.beanName = "MySQL";

        // 使用业务逻辑层完成宠物信息保存
        PetService petService = new PetServiceImpl();
        petService.save(pet);
    }

}
